<?php
/*
Template Name:simplified
Description:
Author:小子
Author Url:http://www.1zdiy.com/
Sidebar Amount:1
*/
if(!defined('EMLOG_ROOT')) {exit('error!');}
require_once (getViews('module'));
if(empty($_SERVER['QUERY_STRING'])){
	$_SERVER['QUERY_STRING'] == '';
	$kl_index_class = 'current';
}else{
	$_SERVER['QUERY_STRING'] = './?'.$_SERVER['QUERY_STRING'];
	$kl_index_class = 'common';
}
$kl_cur_url = $_SERVER['QUERY_STRING'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="keywords" content="<?php echo $site_key; ?>" />
<meta name="description" content="<?php echo $bloginfo; ?>" />
<meta name="generator" content="emlog" />
<title><?php echo $blogtitle; ?></title>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="<?php echo BLOG_URL; ?>xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="<?php echo BLOG_URL; ?>wlwmanifest.xml" />
<link rel="alternate" type="application/rss+xml" title="RSS"  href="<?php echo BLOG_URL; ?>rss.php">
	<link rel="stylesheet" href="<?php echo TEMPLATE_URL; ?>style.css" type="text/css" media="screen" />
	<!--[if IE 7]>
    <link rel="stylesheet" media="screen" type="text/css" href="<?php echo TEMPLATE_URL; ?>ie7.css" />
    <![endif]-->
<script src="<?php echo BLOG_URL; ?>lib/js/common_tpl.js" type="text/javascript"></script>
<?php doAction('index_head'); ?>
</head>
<body>
<!-- begin wrapper -->
<div id="wrapper">
	<!-- begin header -->
	<div id="header">
		<div id="logo"><h1><a href="<?php echo BLOG_URL; ?>"><?php echo $blogname; ?></a></h1><?php echo $bloginfo; ?></div>
		<!-- begin top menu -->
		<div id="topMenu">
		<ul class="sf-menu">
			<li><a class="<?php echo $kl_index_class; ?>" href="./">首页</a></li>
					<?php foreach ($navibar as $key => $val):
					if ($val['hide'] == 'y'){continue;}
					if (empty($val['url'])){$val['url'] = './?post='.$key;}
					($val['url'] == $kl_cur_url || strpos($kl_cur_url, $val['url']) !== false) ? $kl_class = 'current' : $kl_class = 'common';
					?>
					<li><a class="<?php echo $kl_class; ?>"  href="<?php echo $val['url']; ?>" target="<?php echo $val['is_blank']; ?>"><?php echo $val['title']; ?></a>				
            </li>
			<?php endforeach;?>
			<?php doAction('navbar', '<li class="common">', '</li>'); ?>
			<?php if(ROLE == 'admin' || ROLE == 'writer'): ?>
			<li><a href="./admin/write_log.php">写日志</a></li>
			<li><a href="./admin/">管理中心</a></li>
			<li><a href="./admin/?action=logout">退出</a></li>
			<?php else: ?>
			<li><a href="./admin/">登录</a></li>
			<?php endif; ?>
		</ul>
		</div>
		<!-- end top menu -->
		<div class="rss"><a href="<?php echo BLOG_URL; ?>rss.php" title="Our RSS Feed">Our RSS Feed</a></div>
	</div>
	<!-- end header -->
	
	<!-- begin content -->
	<div id="content" class="clearfix">

